import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-03-04
 * Time: 13:30
 */
@SuppressWarnings({"all"})
public class ArrayListSource {
    public static void main(String[] args) {
        //分析:
        //无参构造器创建list对象
        ArrayList list = new ArrayList(8);
        //ArrayList list = new ArrayList();
        //使用for 循环 给list集合添加数据 1-10数据
        for (int i = 0; i <= 10; i++) {
            list.add(i);
        }
        //使用for给list添加11-15数据
        for (int i = 11; i <= 15; i++) {
            list.add(i);
        }

        list.add(100);
        list.add(200);
        list.add(null);
    }
}
